package interfaces;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;

import Script.Offset;
import Script.JTableFile;
import Pointers.JPointerFactory.PointerType;

public interface ScriptInserter {
	
	/**
	 * Inserts a script into the game file associated with this inserter.
	 * 
	 * @param textStart	 	Starting offset for text insertion in gamefile. 
	 * 						Inclusive.
	 * @param textEnd 		Ending offset for text insertion in gamefile. 
	 * 						Inclusive.
	 * @param script 		Script text file.
	 * @param pOffsets 		Offsets to read pointers from.
	 * @param pType 		type of pointer to read.
	 * @param table 		Tablefile to use for inserting.
	 * @param fixedLength 	The length of the fixed-length entries 
	 * 						in the script.
	 * 					  	0 if fixed length isn't used.
	 * @param padByte 		The byte value used to pad any fixed lengh entries
	 * 				 		that doesn't fill up its entire allocated space.
	 * @throws IOException 
	 * @throws FileNotFoundException 
	 * 
	 */
	public ArrayList<ErrorReport> insert(Offset textStart, Offset textEnd,
			   		   File script, long header, ArrayList<Offset> pOffsets,
			   		   PointerType pType, JTableFile table, 
			   		   int fixedLength, byte padByte) throws FileNotFoundException, IOException;
}
